package com.elderly.model.result;

import lombok.Data;

/**
 * @Description 响应体
 * @Date 2021/10/4 16:48
 * @Created 30500
 */
@Data
public class RequestResult<T> {
    /**
     * 状态码
     */
    private Integer code = ResultCode.RC_200;

    /**
     * 相应信息
     */
    private String result;

    /**
     * 响应数据
     */
    private T data;

    public RequestResult() {
    }

    public RequestResult(String result) {
        this.result = result;
    }

    public RequestResult(T data) {
        this.data = data;
    }

    public RequestResult(Integer code, String result) {
        this.code = code;
        this.result = result;
    }

    public RequestResult(Integer code, String result, T data) {
        this.code = code;
        this.result = result;
        this.data = data;
    }


}
